% This file creates Figure 4 and saves it as Figure5 in
% Replication_files\Figures.

cd ../mat_files

load('fig9_model_cbase.mat')
load('nr2020_tfp_corrs.mat')

fig9=figure;
box('on');
hold on

% plot(-8:8,nekarda_ramey,'-.k','LineWidth',1);
plot(-8:8,corrs(:,3),'-.k','LineWidth',1);
plot(-8:8,corr_w_inertia,'k-*','LineWidth',1);
plot(-8:8,corr_wo_inertia,'k--o','LineWidth',1);
ylim([-0.2,1]);
y1=get(gca,'ylim');
plot(-8:8,zeros(1,17),'--k','LineWidth',0.5);
plot([0 0],y1,'--k','LineWidth',0.5);
legend({'Nekarda and Ramey (2020)','Model with Inertia', ...
        'Model without Inertia'},'FontSize',11,'FontWeight','normal')

xlabel('Lead/Lag of Markup','FontSize',11,'FontWeight','normal');
ylabel('Correlation with Output','FontSize',11,'FontWeight','normal');

fig9.PaperUnits='inches';
fig9.PaperPosition=[0 0 9 5];

cd ../Figures
print('Figure_9','-depsc','-tiff')
cd ../m_files